# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kblocks
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://kde.org/applications/games/kblocks/"
pkgdesc="The classic falling blocks game"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev kconfig-dev kconfigwidgets-dev kcoreaddons-dev kcrash-dev kdoctools-dev kdbusaddons-dev ki18n-dev kwidgetsaddons-dev kxmlgui-dev libkdegames-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kblocks-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="9179ef69c21fcbf7e6c1071f34d1ff93045f4fe16f50db42a88a116c49f30acfaa16e7e78b3731be584de76d1907208d050fbef9b246602efdc48038ed8a8671  kblocks-20.04.3.tar.xz"
